{% extends "personal_center/base.html" %}
<!--固定资产付款创建页-->
{% block page_link %}
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
    <link rel="stylesheet" href="../../static/personnel/TimeSelector/skin/jedate.css">
    <link rel="stylesheet" href="../../static/finance/js/lib/zepto.css" type="text/css">
    <script src="../../static/finance/js/lib/jquery-1.10.2.js"></script>
    <script src="../../static/finance/js/lib/zepto.min.js"></script>
    <script src="../../static/finance/js/lib/lrz.min.js"></script>
    <script type="text/javascript" src="../../static/public_file/js/ModalBox.js"></script>
{% endblock %}


{% block style %}
    <style>
        .add_class {
            background: #1E90FF;
        }

        tr {
            height: 37px;
        }

        th {
            text-align: center;
        }

        tbody td {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        td:first-child, th:first-child {
            position: sticky;
            left: 0; /* 首行永远固定在左侧 */
            z-index: 1;
        }

        thead tr th {
            position: sticky;
            top: 0; /* 列首永远固定在头部  */
            background-color: #E8E8E8;
        }

        th:first-child {
            z-index: 2;
        }

        #tb_1 tr:hover {
            background: #cfcfcf;
        }

        .file {
            position: relative;
            display: inline-block;
            background: #D0EEFF;
            border: 1px solid #99D3F5;
            border-radius: 4px;
            padding: 4px 12px;
            overflow: hidden;
            color: #1E88C7;
            text-decoration: none;
            text-indent: 0;
            line-height: 20px;
        }

        .file input {
            position: absolute;
            font-size: 100px;
            right: 0;
            top: 0;
            opacity: 0;
        }

        .file:hover {
            background: #AADFFD;
            border-color: #78C3F3;
            color: #004974;
            text-decoration: none;
        }

        .top_tag {
            border-bottom: #01AAED solid 2px;
            color: #01AAED;
        }

        .tab_top {
            width: 100px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            display: inline-block;
            cursor: pointer;
        }

        .button_for_control {
            width: 90px;
            height: 30px;
            border: 1px solid #99D3F5;
            background: #D0EEFF;
            border-radius: 4px;
            letter-spacing: 0;
            line-height: 30px;
            color: #089bab;
            margin: 5px 0;
        }

        #page_one button:hover {
            color: red;
        }

        .time-adress-td {
            border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;outline: none;
        }
        .time_input {
            text-align: left;width: 100%;border: none;font-size: 8px;outline: none;
        }

        .shade {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(36, 36, 36, 0.5);
            display: none;
            z-index: 10000;
        }
        #addForm1 {
            width: 800px;
            height: 620px;
            background: #F5F5F5;
            position: absolute;
            border: #dfdfdf solid 1px;
            margin: auto;
            border-radius: 3px;
            top: 50%;
            left: 50%;
            /* 实现鼠标拖拽使用css3效果 */
            transform: translate(-50%, -50%);
            z-index: 10100;
            font-size: 0;
        }
        #title {
            display: flex;
            justify-content: space-between;
            box-sizing: border-box;
            padding: 0 10px;
            height: 50px;
            color: #0b0b0b;
            cursor: move;
            /*border: #dfdfdf solid 1px;*/
            width: 100%;background: #f4f7fa;border-top-left-radius: 5px;border-top-right-radius: 5px;
        }
        .search {
            width: 300px;
            display: flex;
            float: right;
            margin: 10px 0;
            margin-right: 1%;
            /*border: 1px solid red;*/
        }

        .search input {
            vertical-align: middle;
            float: left;
            flex: 4;
            height: 30px;
            width: 230px;
            outline: none;
            border: 1px solid #0070c1;
            box-sizing: border-box;
            border-bottom-left-radius: 3px;
            border-top-left-radius: 3px;
        }
        .search button {
            float: right;
            flex: 1;
            height: 30px;
            width: 70px;
            line-height: 30px;
            background-color: #0070c1;
            color: white;
            border-style: none;
            outline: none;
            border-bottom-right-radius: 3px;
            border-top-right-radius: 3px;
        }
        .search button i {
            font-style: normal;
        }
        .search button:hover {
            font-size: 16px;
        }
        .li-class {
            list-style: none;
            margin-top: 2%;
            color: #0b0b0b;
            cursor: pointer;
            height: 30px;
            line-height: 30px;
        }
        .add_background {
            background: #A9A9A9;
        }
        .a_tag_cla{
            display: block;
            /*超出隐藏*/
            overflow: hidden;
            /*禁止换行*/
            white-space: nowrap;
            /*超出用省略号代替*/
            text-overflow: ellipsis;height: 30px;line-height: 30px;padding-left: 1%;
        }
    </style>
{% endblock %}


{% block right_content %}
    <div class="headline">
        <div id="DW_tag" class="tab_top top_tag" onclick="change_mind('DW')">
            申请详情
        </div>
        <div id="LH_tag" class="tab_top" onclick="change_mind('LH')">
            附件
        </div>
        <div id="lct_tag" class="tab_top" onclick="change_mind('lct')">
            流程图
        </div>
        <div id="" style="width: 100px;float: right;text-align: center;margin-right: 1%;height: 40px;">
            <button id="" onmousemove="page_zhanshi()" onmouseout="page_yincang()"
                    style="width: 100px;height: 30px;line-height: 27px;border: #1E90FF solid 1px;background: #1E90FF;color: white;margin-top: 5px;border-radius: 3px;">
                操作
            </button>
        </div>
        <div style="width: 110px;float: right;text-align: center;margin-right: 6px;height: 40px;">
            <button style="line-height: 27px;border-radius: 3px;border: #1E90FF solid 0.5px;width: 100px;height: 30px;margin-top: 5px;background: #1E90FF;color: white;">
                <a href="javascript:history.go(-1)" style="color: white;">返回</a></button>
        </div>
        <!-- 操作按钮隐藏块 -->
        <div id="page_one" onmousemove="page_zhanshi()" onmouseout="page_yincang()"
             style="z-index: 1000; position: absolute; width: 100px; height: auto;right: 0.9%; top: 80px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;padding: 5px;display: none;">
            <button onclick="print_topics()" class="button_for_control">
                打印
            </button>
            {% if is_audit == 'true' and is_edit == 'false' %}
                <button id="approve" onclick="online_tag()" class="button_for_control">
                    审批
                </button>
            {% endif %}

            {% if is_recall == 'true' and is_edit == 'false' %}
                <button id="is_recall" onclick="operate_button(this.id)" class="button_for_control">
                    撤回
                </button>
            {% endif %}

            {% if is_cancel == 'true' and is_edit == 'false' %}
                <button id="is_cancel" onclick="operate_button(this.id)" class="button_for_control">
                    作废
                </button>
            {% endif %}

            {% if is_stop == 'true' and is_edit == 'false' %}
                <button id="is_stop" onclick="operate_button(this.id)" class="button_for_control">
                    终止
                </button>
            {% endif %}

            {% if is_edit == 'true' %}
                <button id="add_station" type="button" class="button_for_control" onclick="ExportCar()">
                    提交
                </button>
            {% endif %}
        </div>
    </div>
    <hr>

    <div id="new_models2" style="width: 80%;height: 80%;display: none;position: absolute">
        <div style="width: 700px;height: 500px;background: #F5F5F5;z-index: 10100;position: absolute;top: 50%;left: 50%;transform:translate(-50%,-50%);border-radius: 3px;border: #dfdfdf solid 1px;">
            <div id="box"
                 style="width: 100%;height: 50px;background: #f4f7fa;cursor: move;border-top-left-radius: 5px;border-top-right-radius: 5px;">
                <h5 id="modal-title" class="modal-title"
                    style="line-height: 50px;margin-left: 1%;display: inline-block;">审批</h5>
                <span onclick="close_models()" style="float: right;line-height: 50px;padding-right: 2%;cursor: pointer;"><i class="iconfont icon-quchu"></i></span>
            </div>
            <hr>
            <div style="height: 400px;width: 100%;padding-top: 2%;padding-left: 2%;">
                <div style="width: 100%">
                    <div style="display: inline-block; width: 30%;">
                        <label style="vertical-align: top;">审批</label>
                        <input type="radio" name="approve" value="audit" checked>同意
                        <input style="margin-left: 3%;" type="radio" name="approve" value="draft">不同意
                    </div>
                </div>
                <div style="margin-top: 2%;width: 100%;">
                    <label style="vertical-align: top;">意见</label>
                    <textarea name="" id="opinion_detail" cols="30" rows="10" style="width: 90%;"></textarea>
                </div>
            </div>
            <hr>
            <div style="width: 100%;height: 50px;text-align: right;padding-right: 2%; position: absolute; bottom: 0; right: 18px;">
                <button onclick="summit_data()"
                        style="width: 100px;height: 30px;border: #dfdfdf solid 1px;margin-top: 10px;border-radius: 3px;background: #1E90FF;color: white;">
                    提交
                </button>
            </div>
        </div>
    </div>

    <div id="DW" style="width: 100%;height: 95%;background: white;overflow: auto;">
        <div id="menu_from" style="width: 100%;height: 100%;color: #2C3E50;display: inline-block;vertical-align: top;background: white;">
            <div style="width: 80%;height: 90%;display: inline-block;vertical-align: center;margin-left: 10%;margin-top: 20px;">
                <div style="width: 95%;margin-left: 2.5%;">
                    <table style="width: 100%;">
                        <tr style="width: 100%;">
                            <td colspan="4" style="height: 45px;text-align: center;font-size: 23px;border: #cfcfcf 1px solid;border-bottom: none;">差旅报销申请</td>
                        </tr>
                        <tr>
                            <td colspan="4" style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;">
                                基本信息
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 0.5%;">
                                申&nbsp;&nbsp;&nbsp;请&nbsp;&nbsp;&nbsp;人
                            </td>
                            <td id="applicat" style="width: 26%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">
                                {{ apply }}
                            </td>
                            <td style="width: 8%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                所&nbsp;&nbsp;&nbsp;属&nbsp;&nbsp;&nbsp;科&nbsp;&nbsp;&nbsp;室
                            </td>
                            <td id="company" style="width: 26%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">{{ company }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 0.5%;">
                                出&nbsp;&nbsp;&nbsp;差&nbsp;&nbsp;&nbsp;人
                            </td>
                            {% if is_edit == 'true' %}
                                <td id="business_people" style="width: 26%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;" onclick="fill_val('', '', 'travel')">
                                    <input id="conferee" type="text" style="border: none;outline: none;width: 98%;height: 100%;" value="{{ data_obj.travel_people }}">
                                </td>
                            {% else %}
                                <td id="business_people" style="width: 26%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">
                                    <input id="conferee" type="text" style="border: none;outline: none;width: 98%;height: 100%;" value="{{ data_obj.travel_people }}" readonly>
                                </td>
                            {% endif %}

                            <td style="width: 10%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                申&nbsp;&nbsp;&nbsp;请&nbsp;&nbsp;&nbsp;时&nbsp;&nbsp;&nbsp;间
                            </td>
                            <td id="apply_time" style="width: 24%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">
                                {{ data_obj.apply_time }}
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 10%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                出&nbsp;差&nbsp;天&nbsp;数
                            </td>
                            <td id="business_days" style="width: 24%;height: 37px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;outline: none;" contenteditable="{{ is_edit }}">
                                {{ data_obj.business_days }}
                            </td>

                            <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 0.5%;">
                                <p id="demo-3">{% if is_edit == 'true' %} <img src="../../static/finance/img/提示说明.png" style="width: 12px;height: 12px;" alt=""> {% endif %} 伙食补助费(元)</p>
                            </td>
                            <td id="hotel_expense" style="width: 26%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">{{ data_obj.hotel_expense }}</td>
                        </tr>
                        <tr>
                            <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                经&nbsp;费&nbsp;来&nbsp;源
                            </td>
                            <td id="SourceFunds" style="height: 26px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;outline: none;">
                                {% if is_edit == 'true' %}
                                    <input type="checkbox" class="checked_rdo" name="rdo" value="1" {% if trave_obj.SourceFunds == '1' %} checked {% endif %} > 学科经费 &nbsp;&nbsp;&nbsp;
                                    <input type="checkbox" class="checked_rdo" name="rdo" value="2" {% if trave_obj.SourceFunds == '2' %} checked {% endif %} > 公卫经费 &nbsp;&nbsp;&nbsp;
                                    <input type="checkbox" class="checked_rdo" name="rdo" value="3" {% if trave_obj.SourceFunds == '3' %} checked {% endif %} > 自有经费
                                {% else %}
                                    {% if trave_obj.SourceFunds == '1' %}
                                        学科经费
                                    {% elif trave_obj.SourceFunds == '2' %}
                                        公卫经费
                                    {% else %}
                                        自有经费
                                    {% endif %}
                                {% endif %}
                            </td>
                            <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                收&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;款&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;人
                            </td>
                            <td id="payee" style="height: 26px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;outline: none;" contenteditable="{{ is_edit }}">{{ data_obj.payee }}
                            </td>
                        </tr>
                        <tr>
                            {% if is_edit == 'true' %}
                                <td style="width: 10%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                    <p id="demo-1">{% if is_edit == 'true' %} <img src="../../static/finance/img/提示说明.png" style="width: 12px;height: 12px;" alt=""> {% endif %} 市内交通费</p>
                                </td>
                                <td id="traffic_expense" style="height: 24px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;outline: none;" contenteditable="true">{{ data_obj.traffic_expense }}</td>
                                <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                    审&nbsp;&nbsp;&nbsp;核&nbsp;&nbsp;&nbsp;科&nbsp;&nbsp;&nbsp;室
                                </td>
                                <td style="width: 26%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">
                                    <select name="" id="sh_people" style="border: none;outline: none;width: 100%;height: 100%;">
                                        <option value="0">本科室负责人</option>
                                        <option value="2">医务科负责人</option>
                                        <option value="3">护理部负责人</option>
                                        <option value="4">党政办负责人</option>
                                    </select>
                                </td>
                            {% else %}
                                <td style="width: 10%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                    <p id="demo-1">市内交通费</p>
                                </td>
                                <td id="traffic_expense" colspan="3" style="height: 24px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;outline: none;" contenteditable="{{ is_edit }}">{{ data_obj.traffic_expense }}</td>
                            {% endif %}

                        </tr>
                        <tr>
                            <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                出&nbsp;差&nbsp;事&nbsp;由
                            </td>
                            <td id="business_matter" colspan="3" style="height: 26px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;outline: none;" contenteditable="{{ is_edit }}">{{ data_obj.business_matter }}</td>
                        </tr>
                        <tr>
                            <td style="width: 8%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注
                            </td>
                            <td id="remarks" colspan="3" style="width: 26%;height: 37px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;outline: none;" contenteditable="{{ is_edit }}">{{ data_obj.remarks }}</td>
                        </tr>
                    </table>
                    <table style="width: 100%;" id="time_adress">
                        <tr>
                            <td colspan="4" style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;border-top: none;">
                                <span>起止时间及地点</span>
                            </td>
                            <td colspan="4" style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;border-top: none;">
                                <span>&nbsp;&nbsp;&nbsp;&nbsp;交&nbsp;&nbsp;&nbsp;&nbsp;通&nbsp;&nbsp;&nbsp;&nbsp;费</span>
                                {% if is_edit == 'true' %}
                                    <span style="float: right;padding-right: 10px;color: #00a0e9;cursor: pointer;" onclick="add_time_adress()">添加</span>
                                {% endif %}
                            </td>
                        </tr>
                        {% if data_obj.reimburse_dict.TimeAdressList|length %}
                            {% for foo in data_obj.reimburse_dict.TimeAdressList %}
                                <tr>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                        时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间
                                    </td>
                                    <td class="time-adress-td time_adress" style="width: 15%;border: #cfcfcf solid 0.5px;">
                                        <input type="text" class="time_input" style="border: none;outline: none;" value="{{ foo.str }}" {% if is_edit == 'false' %} readonly {% endif %} ></td>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                        起点-终点
                                    </td>
                                    <td class="time-adress-td" style="width: 15%;border: #cfcfcf solid 0.5px;">
                                        <input class="time_adress_input" type="text" style="width: 100%;height: 100%;border: none;outline: none;" value="{{ foo.money }}" {% if is_edit == 'false' %} readonly {% endif %}>
                                    </td>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                        交通工具
                                    </td>
                                    <td class="time-adress-td td-input" style="width: 15%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">{{ foo.str1 }}
                                    </td>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                        发票金额
                                    </td>
                                    <td class="time-adress-td" style="width: 15%;border: #cfcfcf solid 0.5px;" contenteditable="true">
                                        <input class="city_input" type="text" style="width: 75%;height: 100%;border: none;outline: none;" value="{{ foo.money1 }}" {% if is_edit == 'false' %} readonly {% endif %}>
                                        {% if is_edit == 'true' %}
                                            <span style="float: right;padding-right: 10px;color: red;cursor: pointer;" onclick="remove_time_adress(this)">删除</span>
                                        {% endif %}
                                    </td>
                                </tr>
                            {% endfor %}
                        {% else %}
                            <tr>
                                <td class="time-adress-td" style="width: 8%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                    时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间
                                </td>
                                <td class="time-adress-td time_adress" style="width: 26%;border: #cfcfcf solid 0.5px;">
                                    <input type="text" class="time_input" style="border: none;outline: none;" {% if is_edit == 'false' %} readonly {% endif %} ></td>
                                </td>
                                <td class="time-adress-td" style="width: 8%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                    起点-终点
                                </td>
                                <td class="time-adress-td" style="width: 15%;border: #cfcfcf solid 0.5px;">
                                    <input class="time_adress_input" type="text" style="width: 100%;height: 100%;border: none;outline: none;" {% if is_edit == 'false' %} readonly {% endif %}>
                                </td>
                                <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                    交通工具
                                </td>
                                <td class="time-adress-td td-input" style="width: 15%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">
                                </td>
                                <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                    发票金额
                                </td>
                                <td class="time-adress-td" style="padding-right: 1%;width: 15%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">
                                    <input class="city_input" type="text" style="width: 100%;height: 100%;border: none;outline: none;">
                                </td>
                            </tr>
                        {% endif %}

                    </table>
                    <table style="width: 100%;" id="accommodation">
                        <tr>
                            <td colspan="8" style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;border-top: none;">
                                <span style="letter-spacing:28px;">住宿费</span>
                                {% if is_edit == 'true' %}
                                    <span style="float: right;padding-right: 10px;color: #00a0e9;cursor: pointer;" onclick="add_accommodation()">添加</span>
                                {% endif %}
                            </td>
                        </tr>
                        {% if data_obj.reimburse_dict.AccommodationList|length %}
                            {% for foo in data_obj.reimburse_dict.AccommodationList %}
                                <tr>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                        住宿人数
                                    </td>
                                    <td class="time-adress-td accommodation" style="width: 15%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">{{ foo.str }}</td>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                        住宿天数
                                    </td>
                                    <td class="time-adress-td DaysAccommodation" style="width: 15%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">{{ foo.str1 }}</td>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                        发票金额
                                    </td>
                                    {% if is_edit == 'true' %}
                                        <td class="time-adress-td" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;">
                                            <input class="accommodation_input" type="text" style="width: 85%;height: 100%;border: none;outline: none;" value="{{ foo.money }}">
                                            <span style="float: right;padding-right: 10px;color: red;cursor: pointer;" onclick="remove_time_adress(this)">删除</span>
                                        </td>
                                    {% else %}
                                        <td class="time-adress-td" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;">
                                            <input class="accommodation_input" type="text" style="width: 100%;height: 100%;border: none;outline: none;" value="{{ foo.money }}" readonly>
                                        </td>
                                    {% endif %}
                                </tr>
                            {% endfor %}
                        {% else %}
                            <tr>
                                <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                    住宿人数
                                </td>
                                <td class="time-adress-td accommodation" style="width: 15%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">
                                </td>
                                <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                    住宿天数
                                </td>
                                <td class="time-adress-td DaysAccommodation" style="width: 15%;border: #cfcfcf solid 0.5px;"  contenteditable="{{ is_edit }}"></td>
                                <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                    发票金额
                                </td>
                                <td class="time-adress-td" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;">
                                    <input class="accommodation_input" type="text" style="width: 100%;height: 100%;border: none;outline: none;" {% if is_edit == 'false' %} readonly {% endif %} >
                                </td>
                            </tr>
                        {% endif %}
                    </table>

                    <table style="width: 100%;" id="other">
                        <tr>
                            <td colspan="8" style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;border-top: none;">
                                <span style="letter-spacing:70px;">其他</span>
                                {% if is_edit == 'true' %}
                                    <span style="float: right;padding-right: 10px;color: #00a0e9;cursor: pointer;" onclick="add_other()">添加</span>
                                {% endif %}
                            </td>
                        </tr>
                        {% if data_obj.reimburse_dict.OtherList|length %}
                            {% for foo in data_obj.reimburse_dict.OtherList %}
                                <tr>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                        报销类型
                                    </td>
                                    <td class="time-adress-td other" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">{{ foo.str }}</td>
                                    <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                        发票金额
                                    </td>
                                    {% if is_edit == 'true' %}
                                        <td class="time-adress-td" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;">
                                            <input class="other_input" type="text" style="width: 85%;height: 100%;border: none;outline: none;" value="{{ foo.money }}">
                                            <span style="float: right;padding-right: 10px;color: red;cursor: pointer;" onclick="remove_time_adress(this)">删除</span>
                                        </td>
                                    {% else %}
                                        <td class="time-adress-td" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;">
                                            <input class="other_input" type="text" style="width: 100%;height: 100%;border: none;outline: none;" value="{{ foo.money }}" {% if is_edit == 'false' %} readonly {% endif %}>
                                        </td>
                                    {% endif %}

                                </tr>
                            {% endfor %}
                        {% else %}
                            <tr>
                                <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 0.5%;border: #cfcfcf solid 0.5px;">
                                    报销类型
                                </td>
                                <td class="time-adress-td other" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;" contenteditable="{{ is_edit }}">
                                </td>
                                <td class="time-adress-td" style="width: 10%;text-align: right;padding-right: 1%;border: #cfcfcf solid 0.5px;">
                                    发票金额
                                </td>
                                <td class="time-adress-td" colspan="3" style="width: 40%;border: #cfcfcf solid 0.5px;">
                                    <input class="other_input" type="text" style="width: 100%;height: 100%;border: none;outline: none;" {% if is_edit == 'false' %} readonly {% endif %}>
                                </td>
                            </tr>
                        {% endif %}
                    </table>

                    <table style="width: 100%;">
                        <tr>
                            <td colspan="4" style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;margin-top: 1%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;border-top: none;">
                                <span style="letter-spacing:70px;">合计</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 10%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 0.5%;border-top: none;">
                                合计(元)
                            </td>
                            <td id="total" style="width: 40%;height: 37px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;border-top: none;outline: none;" {% if is_edit == 'true' %} onblur="change_daxie()" {% endif %} contenteditable="{{ is_edit }}">{{ data_obj.total }}</td>
                            <td style="width: 10%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;border-top: none;">
                                大&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;写
                            </td>
                            <td id="total_daxie" style="width: 40%;height: 37px;line-height: 37px;padding-left: 0.5%;border: #cfcfcf solid 0.5px;border-top: none;outline: none;">{{ data_obj.total_daxie }}</td>
                        </tr>
                    </table>
                    <table style="width: 100%; ">
                        <tr>
                            <td colspan="8"
                                style="width: 90%;height: 40px;margin-left: 5%;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">
                                审批详情
                            </td>
                        </tr>
                        {% for k,v in audit_dic.items %}
                            {% if k == 'one' %}
                                <tr id="fzrcs_tr" style="width: 100%;">
                                    <td style="width: 10%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                        科室负责人
                                    </td>
                                    <td id="fzrcs" style="width: 90%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div id="fzrcs_op" style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endfor %}

                        {% for k,v in audit_dic.items %}
                            {% if k == 'nine' %}
                                <tr id="jfly_tr" style="width: 100%;">
                                    <td style="width: 10%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                        经&nbsp;费&nbsp;来&nbsp;源
                                    </td>
                                    <td id="jfly" style="width: 90%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div id="jfly_op" style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endfor %}

                        <!--财务科意见-->
                        {% for k,v in audit_dic.items %}
                            {% if k == 'two' %}
                                <tr id="fgld_tr" style="width: 100%;">
                                    <td style="width: 10%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                        财&nbsp;务&nbsp;出&nbsp;纳
                                    </td>
                                    <td id="zhuren"
                                        style="width: 90%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endfor %}

                        {% for k,v in audit_dic.items %}
                            {% if k == 'three' %}
                                <!--分管领导意见-->
                                <tr id="ybzr_tr" style="width: 100%;">
                                    <td style="width: 10%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                        分&nbsp;管&nbsp;领&nbsp;导
                                    </td>
                                    <td id="fenguan"
                                        style="width: 90%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endfor %}
                        <!--财务科长意见-->
                        {% for k,v in audit_dic.items %}
                            {% if k == 'four' %}
                                <tr style="width: 100%;">
                                    <td style="width: 10%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                        财&nbsp;务&nbsp;科&nbsp;长
                                    </td>
                                    <td id="bangongshi"
                                        style="width: 90%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endfor %}
                        <!--院领导审核意见-->
                        {% for k,v in audit_dic.items %}
                            {% if k == 'five' %}
                                <tr style="width: 100%;">
                                    <td style="width: 10%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                        院领导审核
                                    </td>
                                    <td id="bangongshi"
                                        style="width: 90%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">

                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endfor %}
                        <!--出纳支付意见-->
                        {% for k,v in audit_dic.items %}
                            {% if k == 'six' %}
                                <tr style="width: 100%;">
                                    <td style="width: 10%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                        出&nbsp;纳&nbsp;支&nbsp;付
                                    </td>
                                    <td id="bangongshi" style="width: 90%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="display: inline-block;">
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                        {% for foo in payment_obj %}
                                            <img src="{{ foo }}" data-src="{{ foo }}" style="width: 300px;height: 100px;display: inline-block;margin-top: 5px;margin-bottom: 5px;">
                                        {% endfor %}
                                    </td>
                                </tr>
                            {% endif %}
                        {% endfor %}
                    </table>
                </div>
                {% if is_edit == 'true' %}
                    <div style="width: 95%;margin-left: 2.5%;">
                        <div style="width: 100%;height: 40px;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;border-top: none;border-bottom: none;padding-right: 1%;">
                            上传附件
                            <a href="javascript:;" class="file" style="vertical-align: top;margin-top: 5px;float: right;">
                                上传文件
                                <input type="file" name="party_main_body" id="party_main_body"
                                       onchange="upload_accessory('file1', 'party_main', 'party_main_body')">
                            </a>
                        </div>
                        <table style="width: 100%;">
                            <thead>
                            <tr>
                                <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">序号</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    文件名称
                                </td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    文件大小
                                </td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    上传时间
                                </td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                    上传人员
                                </td>
                                <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;">操作
                                </td>
                            </tr>
                            </thead>
                            <tbody style="overflow: auto;" id="party_main">
                            {% for record in file_list %}
                                <tr>
                                    <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">{{ forloop.counter }}</td>
                                    <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_name }}</td>
                                    <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_size }}</td>
                                    <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.upload_time }}</td>
                                    <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.uploader }}</td>
                                    <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;"><a target='_blank' href="{{ record.file_path }}">查看</a> | <a style="color: red;" href='#' onclick='RemoveTr(this, "party_main", {{ record.id }})' >删除</a></td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                {% endif %}
            </div>
        </div>
    </div>

    <div id="LH" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="display: inline-block;width: 20%;vertical-align: top;height: 99%">
            <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">
                附件
            </div>
            <div id="yt_zhengwen" style="width: 100%;">
                {% for item in file_list %}
                    <div><a href="#" class="a_tag_cla" title="{{ item.file_name }}" onclick="chage_yulan(this, '{{ item.file_path }}')">{{ item.file_name }}</a></div>
                {% endfor %}
            </div>

        </div>
        <div style="display: inline-block;width: 78%;vertical-align: top;height: 99%;text-align: center;" id="fujian">
            {% if 'jpg' in file_path or 'JPG' in file_path or 'JPEG' in file_path or 'jpeg' in file_path or 'PNG' in file_path or 'png' in file_path %}
                <img src="{{ file_path }}" alt="" style="width: 800px;height: 100%;">
            {% else %}
                <embed id="embed_file" src="{{ file_path }}" type="application/pdf" style="width: 100%;height: 100%;">
            {% endif %}
        </div>
    </div>

    <div id="lct" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="width: 100%;height: 40%;text-align: center;margin: 20% auto;">
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    ({{ trave_obj.applicat.real_name }})<br>
                    发起人
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    start
                </div>
            </div>

            {% if 'one' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'one' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                科室负责人
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'nine' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'nine' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                经费来源
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'two' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'two' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                财务出纳
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'three' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'three' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                分管领导
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'four' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'four' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                财务科长
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'five' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'five' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                院领导
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'six' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'six' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                出纳支付
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            <div style="display: inline-block;border: #0d8ddb solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    <span style="visibility: hidden;">({{ obj.apply_user.real_name }})</span><br>
                    结束
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    ending
                </div>
            </div>
        </div>
    </div>

    <div id="addForm" class="shade">
        <div id="addForm1">
            <div id="title">
                <div style="width: 20%;margin-left: 1%;display: inline-block;line-height: 50px;font-size: 20px;">
                    <p style="margin-left: 1%;display: inline-block;font-size: 18px;">选择出差人员</p>
                </div>

                <div class="search" style="vertical-align: center;display: inline-block;text-align: right;margin-left: 35%;font-size: 14px;">
                    <input type="text" placeholder="请输入..." name="" id="search_data" value="">
                    <button id="search_button">搜索</button>
                </div>
                <span onclick="close_models1()" style="float: right;line-height: 50px;padding-right: 2%;cursor: pointer;"><i class="iconfont icon-quchu"></i></span>
            </div>
            <hr>
            <div style="display: inline-block;width: 30%;height: 350px;border-right: #E8E8E8 solid 1px;">
                <div style="width: 100%;height: 35px;line-height: 35px;padding-left: 2%;color: #0b0b0b;border-bottom: #cfcfcf solid 1px;font-size: 14px;">
                    <div id="an_branch"
                         style="width: 31.5%;display: inline-block;cursor: pointer;text-align: center;color: #01aaed;">
                        按部门
                    </div>
                    <div id="an_rank"
                         style="width: 31.5%;display: inline-block;cursor: pointer;text-align: center;">按权限
                    </div>
                    <div id="an_func"
                         style="width: 31.5%;display: inline-block;cursor: pointer;text-align: center;">按职能
                    </div>
                </div>
                <div id="department_list" style="width: 100%;height: 315px;overflow: auto;">
                    <div style="width: 100%;height: 100%;text-align: center;">
                        <img style="width: 30%;height: 30%;margin-top: 35%;"
                             src="../../static/public_file/images/jiazai.gif" alt="">
                    </div>
                </div>
            </div>

            <div style="display: inline-block;width: 69.5%;height: 350px;overflow: auto;vertical-align: top;left: 0;font-size: 14px;">
                <table class="table table-hover table-bordered" style="border-collapse: collapse;margin: 0;padding: 0;width: 100%;">
                    <thead style="width: 100%;">
                        <tr style="width: 100%;">
                            <th scope="col" style="width: 10%;height: 30px;border: #dfdfdf solid 1px;">
                                <input id="all_select_checkbox" type="checkbox">
                            </th>
                            <th scope="col" style="width: 20%;height: 30px;border: #dfdfdf solid 1px;">序号</th>
                            <th scope="col" style="width: 35%;height: 30px;border: #dfdfdf solid 1px;">姓名</th>
                            <th scope="col" style="width: 35%;height: 30px;border: #dfdfdf solid 1px;">工号</th>
                        </tr>
                    </thead>
                    <tbody style="overflow: auto;" id="t_table2"></tbody>
                </table>
                <div id="img-display1" style="width: 75%;text-align: center;">
                    <div style="margin-top: 10%;">
                        <img src="../../static/public_file/images/page-img/11.jpg" alt="">
                        <p style="margin: 0;padding: 0;vertical-align: top;">暂无数据</p>
                    </div>
                </div>
            </div>

            <div style="height: 150px;width: 100%;border-top: #E8E8E8 solid 1px;overflow: auto;">
                <div id="checked-label" style="margin-top: 1%;margin-left: 3%;width: 90%;font-size: 14px;">

                </div>
            </div>
            <hr>
            <div style="height: 70px;padding-right: 2%;font-size: 14px;">
                <button id="model-affirm" onclick="choose_people()" style="border-radius: 3px;height: 30px;float: right;margin-top: 15px;border: #1E90FF solid 1px;background: #1E90FF;color: white;">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提&nbsp;交&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </button>
            </div>
        </div>
    </div>
{% endblock %}

{% block script %}
    <script type="text/javascript" src="../../static/personnel/TimeSelector/src/jedate.js"></script>
    <script language="javascript" src="../../static/personal_center/js/jquery.jqprint-0.3.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
            document.getElementById("personage").className = "add_class";
            document.getElementById("sponsor").className = "add-nav-active";
        };

        const uuid = '{{ uuid | safe }}'

        var status = "{{ status | safe }}";
        if (status === 'two') {
            document.getElementById("total").contentEditable='true';
        }

        function change_mind(ele_id) {
            if (ele_id === "DW") {
                document.getElementById("DW").style.display = "inline-block";
                document.getElementById("DW_tag").className = "tab_top top_tag";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            } else if (ele_id === "LH") {
                document.getElementById("LH").style.display = "inline-block";
                document.getElementById("LH_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            }else {
                document.getElementById("lct").style.display = "inline-block";
                document.getElementById("lct_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
            }
        }

        function chage_yulan(this_, file_path) {
            var fujian = document.getElementById("fujian");
            var file_index = file_path.lastIndexOf(".")
            var ext = file_path.substring(file_index+1)
            var arr=['jpg', 'JPG', "JPEG", "jpeg", "PNG", "png"];
            var ext_index=arr.indexOf(ext);
            if (ext_index === -1){
                fujian.innerHTML = '<embed id="embed_file" src="'+file_path+'" type="" style="width: 100%;height: 100%;">'
            }else {
                fujian.innerHTML = '<img src="' + file_path + '" alt="application/pdf" style="width: 800px;height: 100%;">'
            }

            var a_tag_list = document.getElementsByClassName("a_tag_cla");
            for (var i = 0;i<a_tag_list.length; i++){
                a_tag_list[i].style.background='';
            }
            this_.style.background='#cfcfcf';
        }

        // 上传附件
        function upload_accessory(file_type, tbody_id, accessory_type) {
            document.getElementById("loading").style.display = "inline-block";
            var form = new FormData();
            var files = document.getElementById(accessory_type).files[0];
            form.append(file_type, files);
            form.append('number', uuid)
            form.append('source', 'qj')     // 请假
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/topics_attachments_upload", true);
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        creat_table(JsonDate, tbody_id)
                    }
                }
            };
        }

        // 创建附件列表
        function creat_table(JsonData, tbody_id) {
            var t_table = document.getElementById(tbody_id);
            var local_host = window.location.host;
            if (Array.isArray(JsonData["pdf_path"])) {
                for (var i = 0; i < JsonData["pdf_path"].length; i++) {
                    var tr = document.createElement("tr");var td1 = document.createElement("td");var td2 = document.createElement("td");var td3 = document.createElement("td");var td4 = document.createElement("td");var td5 = document.createElement("td");var td6 = document.createElement("td");
                    td1.innerHTML = t_table.children.length + 1;td1.style.textAlign = "center";td1.style.border = "#cccccc solid 1px";td1.style.borderTop = "none";
                    td2.innerHTML = JsonData["file_name"];td2.style.paddingLeft = "1%";td2.style.border = "#cccccc solid 1px";td2.style.borderLeft = "none";td2.style.borderTop = "none";
                    td3.innerHTML = JsonData["file_size"];td3.style.textAlign = "center";td3.style.border = "#cccccc solid 1px";td3.style.borderLeft = "none";td3.style.borderTop = "none";
                    td4.innerHTML = JsonData["upload_time"];td4.style.textAlign = "center";td4.style.border = "#cccccc solid 1px";td4.style.borderLeft = "none";td4.style.borderTop = "none";
                    td5.innerHTML = JsonData["uploader"];td5.style.textAlign = "center";td5.style.border = "#cccccc solid 1px";td5.style.borderLeft = "none";td5.style.borderTop = "none";
                    td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"][i]["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"" + tbody_id + "\", \"" + JsonData["pdf_path"][i]["id"] + "\")'>删除</a>";
                    td6.style.textAlign = "center";td6.style.border = "#cccccc solid 1px";td6.style.borderLeft = "none";td6.style.borderTop = "none";
                    tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4);tr.appendChild(td5);tr.appendChild(td6);
                    t_table.appendChild(tr);
                }
                if (JsonData["pdf_path"].length > 1) {
                    document.getElementById("del_adjunct").style.display = 'block';
                }
            } else {
                var tr = document.createElement("tr");var td1 = document.createElement("td");var td2 = document.createElement("td");var td3 = document.createElement("td");var td4 = document.createElement("td");var td5 = document.createElement("td");var td6 = document.createElement("td");
                td1.innerHTML = t_table.children.length + 1;td1.style.textAlign = "center";td1.style.border = "#cccccc solid 1px";td1.style.borderTop = "none";
                td2.innerHTML = JsonData["file_name"];td2.style.paddingLeft = "1%";td2.style.border = "#cccccc solid 1px";td2.style.borderLeft = "none";td2.style.borderTop = "none";
                td3.innerHTML = JsonData["file_size"];td3.style.textAlign = "center";td3.style.border = "#cccccc solid 1px";td3.style.borderLeft = "none";td3.style.borderTop = "none";
                td4.innerHTML = JsonData["upload_time"];td4.style.textAlign = "center";td4.style.border = "#cccccc solid 1px";td4.style.borderLeft = "none";td4.style.borderTop = "none";
                td5.innerHTML = JsonData["uploader"];td5.style.textAlign = "center";td5.style.border = "#cccccc solid 1px";td5.style.borderLeft = "none";td5.style.borderTop = "none";
                td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"" + tbody_id + "\", \"" + JsonData["id"] + "\")'>删除</a>";
                td6.style.textAlign = "center";td6.style.border = "#cccccc solid 1px";td6.style.borderLeft = "none";td6.style.borderTop = "none";
                tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4);tr.appendChild(td5);tr.appendChild(td6);t_table.appendChild(tr);
            }
        }

        function RemoveTr(_this, tbody_id, wj_id) {
            var table = document.getElementById(tbody_id);
            var trNode = $(_this).parent().parent();
            trNode.remove();

            for (var i = 0; i < table.children.length; i++) {
                table.children[i].children[0].innerHTML = i + 1;
            }

            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/delete_attachments_view", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("id=" + String(wj_id));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        alert("删除成功！")
                    }
                }
            };
        }

        function page_zhanshi() {
            document.getElementById('page_one').style.display = 'inline-block';
        }

        function page_yincang() {
            document.getElementById('page_one').style.display = 'none';
        }

        function online_tag() {
            document.getElementById("new_models2").style.display = "table";
        }

        function close_models() {
            document.getElementById("new_models2").style.display = "none";
        }

        function summit_data() {
            var present_id = window.location.href.split("id=")[1].replace("#", '');
            var approve = $("input[type=radio][name=approve]:checked").val();
            var audit_note = document.getElementById("opinion_detail").value;
            if (approve === "draft") {
                if (!audit_note) {
                    alert("不同意请填写理由！");
                    return false
                }
            }
            var note_str = "id=" + present_id + "&state=" + String(approve) + "&audit_note=" + String(audit_note)
            console.log(note_str)
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/finance/travel_approval.html");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send(note_str);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert("审批成功");
                            window.location.href = '/personal-center/process_management.html?type=我的待办&folw_type=&folw=&page=1&page_size=20&wd='
                        } else {
                            alert(JsonDate["message"]);
                        }
                    }
                }
            };
        }

        function ExportCar(draft='0') {
            var travel_id = "{{ id | safe }}";
            var revise = "{{ revise | safe }}";
            var checked_rdo_list = document.getElementsByClassName("checked_rdo");
            var SourceFunds = ''
            for (var i=0; i<checked_rdo_list.length; i++){
                if (checked_rdo_list[i].checked){
                    SourceFunds = checked_rdo_list[i].value
                }
            }
            if (draft === '0') {
                if (!document.getElementById("conferee").value){
                    alert("出差人不能为空！");
                    return false
                }
                if (!document.getElementById("business_matter").innerText){
                    alert("出差事由不能为空！");
                    return false
                }
                if (document.getElementsByClassName("time_adress_input").length === 0){
                    alert("起止时间及地点不能为空！");
                    return false
                }
                var administrative_table = document.getElementById('party_main');
                if (!administrative_table.children.length){
                    alert("请上传附件！");
                    return false
                }
                if (!SourceFunds){
                    alert("请选择经费类型！");
                    return false
                }
                if (!document.getElementById("payee").innerText) {
                    alert("收款人不能为空！");
                    return false
                }
             }
            var form = new FormData();
            var city_list = [];var reimburse_dict = {};var AccommodationList = [];var OtherList = [];var TimeAdressList = [];
            form.append("apply_time", document.getElementById("apply_time").innerText);                 // 申请时间
            form.append("travel_people", document.getElementById("conferee").value);                 // 出差人
            form.append("vote_reluse", $("input[type=radio][name=or_car]:checked").val());                // 是否派车
            form.append("business_days", parseInt(document.getElementById("business_days").innerText));       // 出差天数
            form.append("hotel_expense", document.getElementById("hotel_expense").innerText);                // 伙食费
            form.append("business_matter", document.getElementById("business_matter").innerText);                // 出差事由
            form.append("traffic_expense", document.getElementById("traffic_expense").innerText);               // 市内交通费
            form.append("remarks", document.getElementById("remarks").innerText)                            // 备注
            form.append("total", document.getElementById("total").innerText.trim())                            // 合计
            form.append("total_daxie", document.getElementById("total_daxie").innerText.trim())                            // 大写
            form.append("payee", document.getElementById("payee").innerText.trim())                            // 收款人
            form.append("uuid", uuid);
            form.append("draft", draft);
            form.append("travel_id", travel_id);
            form.append("SourceFunds", SourceFunds)
            if (revise === 'true'){
                form.append("revise", revise);
            }

            var time_adress_input = document.getElementsByClassName("time_adress_input");
            var time_adress_list = document.getElementsByClassName("time_input");
            var city_traffic = document.getElementsByClassName("city_input");
            var city_traffic_list = document.getElementsByClassName("time-adress-td td-input");
            for (var h=0; h<time_adress_input.length; h++) {
                if (time_adress_input[h].value) {
                    TimeAdressList.push({'str': time_adress_list[h].value, 'money': time_adress_input[h].value, 'str1': city_traffic_list[h].innerText, 'money1': city_traffic[h].value})
                }
            }
            reimburse_dict['TimeAdressList'] = TimeAdressList;

            var accommodation_input = document.getElementsByClassName("accommodation_input");
            var accommodation_list = document.getElementsByClassName("time-adress-td accommodation");
            var accommodation_list1 = document.getElementsByClassName("time-adress-td DaysAccommodation");
            for (var j=0; j<accommodation_input.length; j++) {
                if (accommodation_input[j].value) {
                    AccommodationList.push({'str': accommodation_list[j].innerText, 'money': accommodation_input[j].value, 'str1': accommodation_list1[j].innerText})
                }
            }
            reimburse_dict['AccommodationList'] = AccommodationList;

            var other_input = document.getElementsByClassName("other_input");
            var other_list = document.getElementsByClassName("time-adress-td other");
            for (var k=0; k<other_input.length; k++) {
                if (other_input[k].value) {
                    OtherList.push({'str': other_list[k].innerText, 'money': other_input[k].value})
                }
            }
            reimburse_dict['OtherList'] = OtherList;
            form.append("reimburse_dict", JSON.stringify(reimburse_dict));
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/finance/travel_reimbursement.html", true);
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert(JsonDate["message"])
                            window.location.href = "/finance/reimbursement_list.html"
                        } else {
                            alert(JsonDate["message"])
                        }
                    }
                }
             };
        }

        function operate_button(ele_id) {
            var id = window.location.href.split("id=")[1];
            if (ele_id === 'is_stop') {
                var state = 'stop';     // 终止
                var word = '终止'
            } else if (ele_id === 'is_cancel') {
                state = 'cancel';       // 作废
                word = '作废'
            } else {
                state = 'recall'
                word = '撤回'
            }
            var r = confirm('是否' + word + '流程？')
            if (r === true) {
                var xhr = new XMLHttpRequest();
                var local_host = window.location.host;          // 获取当前IP
                xhr.open('post', "/finance/TravelRevokeView", true);
                xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
                xhr.send("state=" + state + "&id=" + id)
                xhr.onreadystatechange = function () {
                    if (xhr.readyState === 4) {
                        if (xhr.status === 200) {
                            document.getElementById("loading").style.display = "none";
                            var JsonDate = JSON.parse(xhr.responseText);
                            console.log(JsonDate);
                            alert(JsonDate['message'])
                            window.location.href = "/personal-center/process_management.html?type=我的待办&folw_type=&folw=&page=1&page_size=20&wd="
                        }
                    }
                };
            }
        }


        let title = document.querySelector("#box");
        let addForm = document.querySelector("#new_models");

        title.addEventListener("mousedown", function (e) {
            let x = e.pageX - addForm.offsetLeft;
            let y = e.pageY - addForm.offsetTop;

            document.addEventListener("mousemove", move);
            function move(e) {
                addForm.style.left = e.pageX - x + 'px';
                addForm.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        $(document).ready(function() {
            uploaderFilesLoad("uploaderFiles","uploaderInput",5,function(){
                console.log();//多张图片中以逗号分隔
            });
        });

        function upload_img() {
            var img_list = getImgFilesData("uploaderFiles").split(',');
            var present_id = window.location.href.split("id=")[1].replace("#", '');
            var note_str = "id=" + present_id + "&state=audit&audit_note=" + String(JSON.stringify(img_list))
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/finance/travel_approval.html");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send(note_str);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert("上传成功");
                            window.location.href = '/personal-center/process_management.html?type=我的待办&folw_type=&folw=&page=1&page_size=20&wd='
                        } else {
                            alert(JsonDate["message"]);
                        }
                    }
                }
            };
        }

        function remove_time_adress(obj) {
            var trNode = $(obj).parent().parent();
            trNode.remove();
        }

        function add_time_adress() {
            var time_adress = document.getElementById("time_adress");
            var tr_tag = document.createElement("tr");
            var td1 = document.createElement("td");td1.className="time-adress-td";td1.style.width="10%";td1.style.textAlign='right';td1.style.paddingRight='0.5%';td1.innerHTML="时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间";
            var td2 = document.createElement("td");td2.className="time-adress-td time_adress";td2.style.width="15%";td2.contentEditable='true';
            var td3 = document.createElement("td");td3.className="time-adress-td";td3.style.width="10%";td3.style.textAlign='right';td3.style.paddingRight='0.5%';td3.innerHTML="起点-终点";
            var td4 = document.createElement("td");td4.className="time-adress-td";td4.style.width="15%";td4.contentEditable='true';
            var td5 = document.createElement("td");td5.className="time-adress-td";td5.style.width="10%";td5.style.textAlign='right';td5.style.paddingRight='0.5%';td5.innerHTML="交通工具";
            var td6 = document.createElement("td");td6.className="time-adress-td td-input";td6.style.width="15%";td6.contentEditable='true';
            var td7 = document.createElement("td");td7.className="time-adress-td";td7.style.width="10%";td7.style.textAlign='right';td7.style.paddingRight='1%';td7.innerHTML="发票金额";
            var td8 = document.createElement("td");td8.className="time-adress-td";td8.style.width="15%";td8.contentEditable='true';
            var span_tag = document.createElement("span");span_tag.style.float='right';span_tag.style.paddingRight="10px";span_tag.style.color="red";span_tag.style.cursor="pointer";
            var input_tag = document.createElement("input");input_tag.style.width='100%';input_tag.style.height='100%';input_tag.style.outline='none';input_tag.style.border='none';input_tag.className='time_adress_input';
            var input_tag1 = document.createElement("input");input_tag1.style.width='70%';input_tag1.style.height='30px';input_tag1.style.outline='none';input_tag1.style.border='none';input_tag1.className="city_input";
            var input_tag2 = document.createElement("input");input_tag2.className="time_input";
            var time_number = document.getElementsByClassName("input-style").length;
            span_tag.innerText="删除";span_tag.setAttribute("onclick", "remove_time_adress(this)");
            td4.appendChild(input_tag);
            td8.appendChild(input_tag1);td8.appendChild(span_tag);td2.appendChild(input_tag2)
            tr_tag.appendChild(td1);tr_tag.appendChild(td2);tr_tag.appendChild(td3);tr_tag.appendChild(td4);tr_tag.appendChild(td5);tr_tag.appendChild(td6);tr_tag.appendChild(td7);tr_tag.appendChild(td8);time_adress.appendChild(tr_tag);
        }

        function add_accommodation() {
            var city_traffic = document.getElementById("accommodation");
            var tr_tag = document.createElement("tr");
            var td1 = document.createElement("td");td1.className="time-adress-td";td1.style.width="10%";td1.style.textAlign='right';td1.style.paddingRight='0.5%';td1.innerText="住宿人数";
            var td2 = document.createElement("td");td2.className="time-adress-td accommodation";td2.style.width="15%";td2.contentEditable='true';
            var td3 = document.createElement("td");td3.className="time-adress-td";td3.style.width="10%";td3.style.textAlign='right';td3.style.paddingRight='1%';td3.innerText="发票金额";
            var td4 = document.createElement("td");td4.className="time-adress-td";td4.colSpan='3';td4.contentEditable='true';td4.style.width="40%";
            var td5 = document.createElement("td");td5.className="time-adress-td";td5.style.width="10%";td5.style.textAlign='right';td5.style.paddingRight='0.5%';td5.innerText="住宿天数";
            var td6 = document.createElement("td");td6.className="time-adress-td DaysAccommodation";td6.style.width="15%";td6.contentEditable='true';
            var span_tag = document.createElement("span");span_tag.style.float='right';span_tag.style.paddingRight="10px";span_tag.style.color="red";span_tag.style.cursor="pointer";
            var input_tag = document.createElement("input");input_tag.style.width='90%';input_tag.style.height='100%';input_tag.style.outline='none';input_tag.style.border='none';input_tag.className='accommodation_input'
            span_tag.innerText="删除";span_tag.setAttribute("onclick", "remove_time_adress(this)");
            td4.appendChild(input_tag);td4.appendChild(span_tag);
            tr_tag.appendChild(td1);tr_tag.appendChild(td2);tr_tag.appendChild(td5);tr_tag.appendChild(td6);tr_tag.appendChild(td3);tr_tag.appendChild(td4);city_traffic.appendChild(tr_tag);
        }

        function add_other() {
            var other = document.getElementById("other");
            var tr_tag = document.createElement("tr");
            var td1 = document.createElement("td");td1.className="time-adress-td";td1.style.width="10%";td1.style.textAlign='right';td1.style.paddingRight='0.5%';td1.innerText="报销类型";
            var td2 = document.createElement("td");td2.className="time-adress-td other";td2.colSpan='3';td2.style.width="40%";td2.contentEditable='true';
            var td3 = document.createElement("td");td3.className="time-adress-td";td3.style.width="10%";td3.style.textAlign='right';td3.style.paddingRight='1%';td3.innerText="发票金额";
            var td4 = document.createElement("td");td4.className="time-adress-td";td4.colSpan='3';td4.style.width="40%";td4.contentEditable='true';
            var span_tag = document.createElement("span");span_tag.style.float='right';span_tag.style.paddingRight="10px";span_tag.style.color="red";span_tag.style.cursor="pointer";
            var input_tag = document.createElement("input");input_tag.style.width='90%';input_tag.style.height='100%';input_tag.style.outline='none';input_tag.style.border='none';input_tag.className='other_input'
            span_tag.innerText="删除";span_tag.setAttribute("onclick", "remove_time_adress(this)");
            td4.appendChild(input_tag);td4.appendChild(span_tag);
            tr_tag.appendChild(td1);tr_tag.appendChild(td2);tr_tag.appendChild(td3);tr_tag.appendChild(td4);other.appendChild(tr_tag);
        }

        function print_topics() {
            $('#menu_from').jqprint({
                debug: false,
                importCSS: true,
                printContainer: true,
                operaSupport: false
            });
        }

        function ToString(money) {
            console.log(money, '执行了吗');
            //汉字的数字
            var cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
            //基本单位
            var cnIntRadice =['', '拾', '佰', '仟'];
            //对应整数部分扩展单位
            var cnIntUnits = ['', '万', '亿', '兆'];
            //对应小数部分单位
            var cnDecUnits = ['角', '分', '毫', '厘'];
            //整数金额时后面跟的字符
            var cnInteger = '整';
            //整型完以后的单位
            // var cnIntLast = '圆';
            var cnIntLast = '元';
            //最大处理的数字
            var maxNum = 999999999999999.9999;
            //金额整数部分
            var integerNum;
            //金额小数部分
            var decimalNum;
            //输出的中文金额字符串
            var chineseStr = '';
            //分离金额后用的数组，预定义
            var parts;
            if (money === '') { return ''; }
            money = parseFloat(money);
            if (money >= maxNum) {
                //超出最大处理数字
                return '';
            }
            if (money === 0) {
                chineseStr = cnNums[0] + cnIntLast + cnInteger;

                return chineseStr;
            }

            //转换为字符串
            money = money.toString();

            if (money.indexOf('.') === -1) {
                integerNum = money;
                decimalNum = '';
            } else {
                parts = money.split('.');
                integerNum = parts[0];

                decimalNum = parts[1].substring(0, 2);
            }
            //获取整型部分转换
            if (parseInt(integerNum, 10) > 0) {
                var zeroCount = 0;
                var IntLen = integerNum.length;
                for (var i = 0; i < IntLen; i++) {
                    // var n = integerNum.substr(i, 1);
                    var n = integerNum.substring(i, i+1);
                    var p = IntLen - i - 1;
                    var q = p / 4;
                    var m = p % 4;
                    if (n === '0') {
                        zeroCount++;
                    } else {
                        if (zeroCount > 0) {
                            chineseStr += cnNums[0];
                        }
                        //归零
                        zeroCount = 0;
                        chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
                    }
                    if (m === 0 && zeroCount < 4) {
                        chineseStr += cnIntUnits[q];
                    }
                }
                chineseStr += cnIntLast;
            }
            //小数部分
            if (decimalNum !== '') {
                var decLen = decimalNum.length;
                for (var i = 0; i < decLen; i++) {
                    // var n = decimalNum.substr(i, 1);
                    var n = decimalNum.substring(i, i+1);
                    if (n !== '0') {
                        // chineseStr += cnNums[Number(n)] + cnDecUnits[i];
                        chineseStr += cnNums[parseInt(n)] + cnDecUnits[i];
                    }
                }
            }
            if (chineseStr === '') {
                chineseStr += cnNums[0] + cnIntLast + cnInteger;
            } else if (decimalNum === '') {
                chineseStr += cnInteger;
            }

            return chineseStr;
        }

        function change_daxie() {
            document.getElementById("total_daxie").innerText=ToString(document.getElementById("total").innerText.replaceAll(",", ''));
            document.getElementById("total").innerText = formatMonenyNumber(document.getElementById("total").innerText.replaceAll(",", ''));
        }

        function formatMonenyNumber(number, toFixed = 2) {
            let str = [];
            if (!number) return 0
            if (typeof number === "number") number = String(number)
            let tempNumber = number.split('.');
            number = tempNumber[0]
            if (number.length <= 3) {
                if (tempNumber[1]) {
                    number += '.' + tempNumber[1].slice(0, toFixed);
                }
                return number
            }
            number.split('').reverse().forEach((item, index) => {
                if (index !== 0 && index % 3 === 0) {
                    str.push(',', item)
                } else {
                    str.push(item)
                }
            })
            number = str.reverse().join('')
            if (tempNumber[1]) {
                var decimils = tempNumber[1].slice(0, toFixed);
                if (decimils.length === 1){
                    decimils = decimils + "0";
                }
                number += '.' + decimils;
            }else {
                 number += '.00'
            }
            return number;
        }
    </script>
{% endblock %}
